<!DOCTYPE html>
<html lang="<%= I18n.locale %>" class="no-js">
  <head>
    <title><%= decidim_page_title %></title>
    <%= render partial: "layouts/decidim/head" %>

    <%= append_javascript_pack_tag "decidim_meetings" %>
    <%= append_javascript_pack_tag "decidim_forms" %>
    <%= stylesheet_pack_tag "decidim_meetings", media: "all" %>
    <%= stylesheet_pack_tag "decidim_forms", media: "all" %>
  </head>

  <body class="meeting-polls__body">
    <%= render partial: "layouts/decidim/timeout_modal" %>

    <header class="meeting-polls__header">
      <div>
        <strong class="text-secondary"><%= current_organization_name %></strong> / <strong><%= present(meeting).title(html_escape: true) %></strong>
      </div>

      <div class="flex gap-10">
        <% if current_user %>
          <%= link_to current_user.name, decidim.account_path, target: "_blank", class: "button button__sm button__text-secondary", data: { "external-link": "text-only" }, "aria-label": t("layouts.decidim.user_menu.account", name: current_user.name) %>
        <% end %>

        <%= link_to meeting_path(meeting), class: "button button__sm button__text-secondary", "aria-label": t("close", scope: "decidim.meetings.layouts.live_event") do %>
          <span><%= t("close", scope: "decidim.meetings.layouts.live_event") %></span>
          <%= icon "close-line" %>
        <% end %>
      </div>
    </header>

    <main class="meeting-polls__main">
      <%= yield %>
    </main>

    <%= render partial: "layouts/decidim/data_consent_warning" %>
    <%= cell("decidim/data_consent", current_organization) %>
    <%= render partial: "layouts/decidim/decidim_javascript" %>

  </body>
</html>
